lib=libmyStdio.a #静态库名称的前缀lib和后缀.a

$(lib):myStdio.o #指明目标库的依赖关系和依赖方法
	@ar -rc $@ $^ #ar -rc -> repalce and creat   ar [aimfile] [curfiles]
myStdio.o:myStdio.c
	@gcc $^ -c -std=c99

.PHONY:clean
clean:
	@rm -rf *.a *.o

.PHONY:output #静态库的发布
output:
	@mkdir -p lib/include
	@mkdir -p lib/libmyStdio
	@cp *.h lib/include
	@cp *.a lib/libmyStdio
